package cn.serenedream.housedecoration.entity;

import jakarta.persistence.*;
import org.springframework.lang.Nullable;

@Entity
public class SaleProducts {
    @Id
    private Long id;

    @Nullable
    @OneToOne
    private Products products;

    @Nullable
    private Integer number;
    @Nullable
    private Double price;
    @Column(columnDefinition = "TEXT")
    private String remark;

    public SaleProducts() {
    }

    public SaleProducts(Long id, Products products, Integer number, Double price, String remark) {
        this.id = id;
        this.products = products;
        this.number = number;
        this.price = price;
        this.remark = remark;
    }

    /**
     * 获取
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取
     * @return products
     */
    public Products getProducts() {
        return products;
    }

    /**
     * 设置
     * @param products
     */
    public void setProducts(Products products) {
        this.products = products;
    }

    /**
     * 获取
     * @return number
     */
    public Integer getNumber() {
        return number;
    }

    /**
     * 设置
     * @param number
     */
    public void setNumber(Integer number) {
        this.number = number;
    }

    /**
     * 获取
     * @return price
     */
    public Double getPrice() {
        return price;
    }

    /**
     * 设置
     * @param price
     */
    public void setPrice(Double price) {
        this.price = price;
    }

    /**
     * 获取
     * @return remark
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 设置
     * @param remark
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String toString() {
        return "SaleProducts{id = " + id + ", products = " + products + ", number = " + number + ", price = " + price + ", remark = " + remark + "}";
    }
}
